{%extends "base.html"%}
{%block title%} 登录页 {%endblock%}
{%block cssLink%}
<link rel="stylesheet" href="{{url_for('static',filename='css/form.css')}}">
{{super()}}
{%endblock%}
{%block content%}
<!-- 1. 导入宏（确保 macro.html 路径正确） -->
{% from 'macro.html' import inputStyle %}
<h3>登录</h3>
{% for message in get_flashed_messages(category_filter=["error"]) %}
<p><span style="color:red">{{message}}</span></p>
{% endfor%}

<form method="POST" action="/login" enctype="multipart/form-data">
    <!--label,name,type,value,required-->
    {{ inputStyle('用户名', 'username','','',True) }}
    {{ inputStyle('密码', 'password','password','',True) }}
    <!--lable,name,type,value,required-->
    <div class="flex-container">
        {{ inputStyle('', 'submit','submit','提交') }}
        {{ inputStyle('', 'reset','reset','重置') }}
    </div>
</form>
<p>
    <a href="/register" style="color:#774CEE">还没有账号？ 去注册吧</a>
</p>
{% endblock %}

